[IA64] Fix TLB purge and reload for xen heap in MCA handler
authorAlex Williamson <alex.williamson@hp.com>
Wed, 12 Dec 2007 17:47:54 +0000 (10:47 -0700)
committerAlex Williamson <alex.williamson@hp.com>
Wed, 12 Dec 2007 17:47:54 +0000 (10:47 -0700)
Xen might panic when the TLB related MCA occurred because Xen
virtual address space moved to 0xf400000004000000.

The following patch fixes it.

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
xen/arch/ia64/linux-xen/mca_asm.S

index 641be79ceb8bbe52f72112e05bf6ef092a118bb5..fc770a09c33a8c36ef9b41f2774bfa01f3782515 100644 (file)
@@ -283,6 +283,19 @@ ia64_do_tlb_purge:
        ;;
        srlz.d
        ;;
+#ifdef XEN
+       /* xen heap is identity mapped */
+       mov r19=ip
+       ;; 
+       dep r17=0,r19,0,KERNEL_TR_PAGE_SHIFT
+       ;; 
+       dep r17=-1,r17,60,4
+       ;; 
+       ptr.d r17,r18
+       ;;
+       srlz.d
+       ;; 
+#endif
        // 2. Purge DTR for PERCPU data.
        movl r16=PERCPU_ADDR
        mov r18=PERCPU_PAGE_SHIFT<<2
@@ -418,6 +431,18 @@ ia64_reload_tr:
        srlz.i
        srlz.d
        ;;
+#ifdef XEN
+       /* xen heap is identity mapped */
+       mov r16=IA64_TR_XEN_HEAP_REGS  
+       dep r17=-1,r17,60,4
+       ;; 
+       mov cr.ifa=r17
+       ;;
+       itr.d dtr[r16]=r18
+       ;;
+       srlz.d
+       ;; 
+#endif
        // 2. Reload DTR register for PERCPU data.
        GET_THIS_PADDR(r2, ia64_mca_per_cpu_pte)
        ;;